<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});


Route::get('user/{id}', 'UserController@showProfile');

Route::get('db/{id}', 'DbController@index');

Route::get('/',function(){return view('welcome');});


Route::get('/', function () {
    return redirect('/blog');
});

Route::get('blog', 'BlogController@index');
Route::get('blog/create', 'BlogController@create');
Route::post('blog/store', 'BlogController@store');
Route::get('blog/delete/{id}', 'BlogController@destroy');

Route::get('blog/{slug}', 'BlogController@showPost');
